<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<style type="text/css">
	body{overflow:auto;}
  thead tr {background-color: ActiveCaption; color: CaptionText;}
  th, td {vertical-align: top; font-family: "宋体", Arial, Helvetica, sans-serif; font-size: 9pt; padding: 3px; }
  table, td {border: 1px solid silver;}
  table {border-collapse: collapse;}
  thead .col0 {width: 20%;}
  thead .col1 {width: 75%;}
	td.col0{font-size:18px;font-weight:bold;color:#f00;}
</style>
<body class="white-bg">
    <table>
      <thead>
        <tr>
          <th class="col0">章节</th>
          <th class="col1">内容</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="col0">第7章 项目部署</td>
          <td class="col1"><span style="font-size:18px;"><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">实现项目的部署，首先需要将开发机器上的数据库导出；然后在部署项目的服务器上重 建数据库；最后将项目文件放在服务器的容器中，如&nbsp;</span><span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 14px="" text-align:="" justify="">Tomcat&nbsp;</span><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">的&nbsp;</span><span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 14px="" text-align:="" justify="">webapps</span><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">，如有必要，可能要 修改一些配置文件的参数，例如数据库的连接。</span></span><br />  </td>
        </tr>
        <tr>
          <td class="col0">7.1 数据库的导出</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体; font-size: 18px;">以&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">dbnews1&nbsp;</span>数据库为例，假定借助&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">HeidiSQL&nbsp;</span>可视化工具实现数据的导出，操作步骤如下：</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">1</span>）用&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">HeidiSQL&nbsp;</span>工具打开本机的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">dbnews1&nbsp;</span>数据库。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">2</span>）右键单击数据库名称&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">dbnews1</span>，在弹出的快捷菜单中了选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">Export database as SQL</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; font-family: 宋体; font-size: 18px;">命令。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px; text-align: justify;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">3</span>）在打开的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Table tools&nbsp;</span>对话框中，勾选&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Database&nbsp;</span>的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Drop&nbsp;</span>和&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Create</span>、勾选&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Table&nbsp;</span>的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Drop&nbsp;</span>和&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Create</span>、选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Data&nbsp;</span>中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Insert</span>、选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Output&nbsp;</span>的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Single .sql file</span>，最后选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">SQL&nbsp;</span>文件保存的路 径和文件名，假定文件名为&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">dbnews1.sql</span>，单击&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Export&nbsp;</span>按钮，如图&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">7-1&nbsp;</span>所示。</p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px; text-align: justify;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">4</span>）等待所有表的导出状态显示&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">100%</span>，且没有报错信息，就完成了整个数据库中所有 表的结构及数据的导出。</p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif; font-size: 9pt;"><br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0pt; padding: 0px 0px 0px 55pt; font-family: Times New Roman, serif; font-size: 9pt; line-height: 10pt; text-align: center;"><span style="margin: 0px; padding: 0px;"><img th:src="@{/assets/javaeeimg/Image_116.png}" style="margin: 0px; padding: 0px;" alt="" /></span></p><p class="s9" style="margin: 0pt; padding: 4pt 0px 0px 4pt; font-family: 宋体; font-size: 9pt; text-align: center;">图&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif; font-size: 9pt;">7-1&nbsp;</span>导出数据库</p> </td>
        </tr>
        <tr>
          <td class="col0">7.2 数据库的导入</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体; font-size: 18px;">假定服务器上已经安装好&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">MySQL</span>，并且已经运行。导入数据的步骤如下：</p><p style="margin: 0pt; padding: 2pt 0px 0px; font-family: times new roman serif; font-size: 9pt" text-align:="" right=""><br /></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">1</span>）用&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">HeidiSQL&nbsp;</span>工具打开服务器的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">MySQL&nbsp;</span>数据库。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px; text-align: justify;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">2</span>）选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">File&nbsp;</span>中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">Load SQL file&nbsp;</span>菜单项或单击工具栏中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">Load SQL file&nbsp;</span>按钮<span style="margin: 0px; padding: 0px; text-indent: 0px;"><img th:src="@{/assets/javaeeimg/Image_117.png}" style="margin: 0px; padding: 0px;" alt="" /></span>，准备 加载&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">SQL&nbsp;</span>文件。如果&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">SQL&nbsp;</span>文件太大，可以直接选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">File&nbsp;</span>中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">Run SQL file&nbsp;</span>菜单项。</p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">3</span>）选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">7.1&nbsp;</span>节中导出的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">SQL&nbsp;</span>文件，如&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">dbnews1.sql</span>。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px; text-align: justify;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">4</span>）<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">SQL&nbsp;</span>文件加载完成后，单击工具栏中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">Execute SQL&nbsp;</span>按钮<span style="margin: 0px; padding: 0px; text-indent: 0px;"><img th:src="@{/assets/javaeeimg/Image_118.png}" style="margin: 0px; padding: 0px;" alt="" /></span>，如图&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">7-2&nbsp;</span>所示，把整 个数据库&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">dbnews1&nbsp;</span>部署到服务器上。</p><p style="margin: 0pt; padding: 0px; font-family: times new roman serif; font-size: 9pt"><br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0pt; padding: 0px 0px 0px 82pt; font-family: times new roman serif; font-size: 9pt" line-height:="" 10pt="" text-align:="" center=""><span style="margin: 0px; padding: 0px;"><img th:src="@{/assets/javaeeimg/Image_119.png}" style="margin: 0px; padding: 0px;" alt="" /></span></p><p class="s9" style="margin: 0pt; padding: 5pt 0px 0px; font-family: 宋体; font-size: 9pt; text-align: center;">图&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: times new roman serif; font-size: 9pt">7-2&nbsp;</span>导入数据库</p><p class="s24" style="margin: 0pt; padding: 7pt 0px 0px 5pt; text-indent: 21pt; font-family: 楷体, monospace; font-size: 18px; line-height: 28px; text-align: justify;"><span style="color:#ff0000;"><span class="s7" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 黑体, monospace; font-size: 18px;">注意：</span>如果导出的文件包含较多的数据，导入时会提示不能加载，但可以直接运行；如 果部分表中的数据特别多，则可以将该表单独导出成一个&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">SQL&nbsp;</span>文件，即将数据库导出成若干 个无重复表数据的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="" font-size:="" 18px="">SQL&nbsp;</span>文件。</span></p><div><br /></div>  </td>
        </tr>
        <tr>
          <td class="col0">7.3 项目导出与部署</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px; text-align: justify;">如果用来部署项目的服务器与开发项目所用的计算机运行&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">JavaEE&nbsp;</span>项目的环境一样，如数 据库的端口配置一样，且不需要把测试数据迁移到服务器，建议采用导出&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">war&nbsp;</span>文件的方法，操 作步骤简单方便。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">1</span>）在&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">MyEclipse&nbsp;</span>中，选中需要导出的项目，如&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">newsnutz</span>。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">2</span>）选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">File&nbsp;</span>菜单中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">Export&nbsp;</span>命令。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">3</span>）导出类型选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">war file</span>，假定导出文件为&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">newsnutz.war</span>。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px; text-align: justify;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">4</span>）把&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">newsnutz.war&nbsp;</span>部署到服务器的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">webapps&nbsp;</span>中，启动&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Tomcat</span>（如果此前&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Tomcat&nbsp;</span>正在 运行，则先将它停止，再启动）。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">5</span>）启动完成后，在&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">webapps&nbsp;</span>中会自动生成&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">newsnutz&nbsp;</span>项目文件夹。</p> </td>
        </tr>
        <tr>
          <td class="col0">7.4 项目复制与部署</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体; font-size: 18px;">如果需要把测试数据（比如上传的文件）迁移到服务器，服务器上数据库的配置与开发<span style="font-size: 18px;">机器不相同，建议采用复制项目文件夹的方法。</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 106pt; font-family: 宋体; font-size: 18px;">假定&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">MyEclipse&nbsp;</span>中指定的服务器为自己安装的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">Tomcat8</span>，找到&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">Tomcat8&nbsp;</span>安装目录下的</p><p class="s6" style="margin: 0pt; padding: 1pt 0px 0px 85pt; font-family: Times New Roman, serif; font-size: 18px;">webapps<span class="s5" style="margin: 0px; padding: 0px; font-family: 宋体; font-size: 18px;">，比如&nbsp;</span>D:\jtmlrw\tomcat8\webapps<span class="s5" style="margin: 0px; padding: 0px; font-family: 宋体; font-size: 18px;">，可以看到项目文件夹，如&nbsp;</span>newsnutz<span class="s5" style="margin: 0px; padding: 0px; font-family: 宋体; font-size: 18px;">。</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 106pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">1</span>）停止开发机器上&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">Tomcat8&nbsp;</span>的运行，复制项目文件夹&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">newsnutz</span>。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 85pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">2</span>）停止服务器上&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Tomcat&nbsp;</span>的运行，在服务器部署项目的文件夹中粘贴复制得到的项目 文件夹&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">newsnutz</span>。</p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 85pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">3</span>）如果配置有变化，则修改配置文件中的参数。如基于&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Nutz&nbsp;</span>框架的项目，数据库配置 不相同，则修改<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">\WEB-INF\classes\ioc\dao.js&nbsp;</span>中的数据库配置参数。</p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 106pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">4</span>）重新启动服务器上的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">Tomcat</span>。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 85pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">5</span>）如果数据库的数据已导入、项目文件已部署到服务器，<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Tomcat&nbsp;</span>服务器运行后，检查 测试项目的运行状况、项目中各功能模块的使用。有问题时，查明原因，立即解决。</p><div><br /></div> </td>
        </tr>
        <tr>
          <td class="col0">7.5 考核任务</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 106pt; font-family: 宋体; font-size: 18px;">选择完成质量最好的一个完整项目上传到服务器。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 85pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">1</span>）导出项目所使用的数据库为单一&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">SQL&nbsp;</span>文件（含数据库和表的创建、表结构、表中的 数据）。（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">50&nbsp;</span>分）</p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 106pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">2</span>）正确部署和展示项目，尤其注意配置文件中相关参数的正确配置，如数据库的配置。</p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 85pt; font-family: 宋体; font-size: 18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; font-size: 18px;">50&nbsp;</span>分）</p> </td>
        </tr>
        <tr>
          <td class="col0">本章小结</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 85pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 28px; text-align: justify;">本章介绍了项目的部署。把开发环境中完成的项目部署到服务器上或者另一台没有开发 环境的计算机上。部署工作分成两部分，一是数据库的迁移；二是项目本身的异机部署。要注 意服务器上的运行环境，如数据库的端口和密码、<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">Tomcat&nbsp;</span>或其他容器的端口、防火墙的设置 等，如果与开发机器有区别，可能涉及到修改配置文件。</p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 85pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 15.82px;">只有把自己或团队合作开发的项目部署到服务器，经过远程测试，一切正常，才能说明 完整地掌握了&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif; font-size: 18px;">JavaEE&nbsp;</span>项目的一般开发和部署流程。</p><div><br /></div> </td>
        </tr>

		</tbody>
    </table>
<div th:include="include :: footer"></div>
</body>
</html>
